Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Sep 22, 2025

This PR integrates 2 optimizations from Osiris for stream consumption:

  • returning stream frame header binary in dispatch chunk callback (stream protocol). This saves a system call by sending the frame header and the chunk header at the same time.
  • reading ahead for small chunks. It is transparent for the stream protocol but required a small tweak in the stream queue type (for AMQP and other non-stream protocols). Read ahead is on by default but can be deactivated with the stream.read_ahead configuration entry (true / false).

Requires to bump Osiris to 1.10.0.

References rabbitmq/osiris#192


This is an automatic backport of pull request #14189 done by Mergify.

This saves a system call by sending the frame header and the chunk
header at the same time.

References rabbitmq/osiris#192

(cherry picked from commit 885e89e)
Osiris can read ahead data in case of small chunks. This saves system
calls and increases consumption rate dramatically for some streams.
This is transparent for the stream protocol, but requires a small tweak
for the stream queue type implementation (passing in the previous
iterator when creating a new one).

The read ahead is on by default but can be deactivated with to the new
stream.read_ahead configuration entry (true / false).

Co-authored-by: Karl Nilsson <[email protected]>

References rabbitmq/osiris#192

(cherry picked from commit 9f162df)
(cherry picked from commit 025280e)
@mergify mergify bot added the make label Sep 22, 2025
@acogoluegnes acogoluegnes added this to the 4.2.0 milestone Sep 22, 2025
@acogoluegnes acogoluegnes merged commit f54b445 into v4.2.x Sep 22, 2025
827 of 853 checks passed
@acogoluegnes acogoluegnes deleted the mergify/bp/v4.2.x/pr-14189 branch September 22, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants